/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * Description:
 * Author: huawei
 * Create: 2022-09-20
 */

#ifndef TS_AGENT_UPDATE_SQE_H
#define TS_AGENT_UPDATE_SQE_H

#include <linux/types.h>
#ifndef TS_AGENT_UT
#include "trs_adapt.h"
#else
struct trs_sqcq_agent_para {
    phys_addr_t rsv_phy_addr;
    size_t      rsv_size;
};
#endif

#define TSAGENT_WARNING_BIT_SRAM_OFFSET    0x200
#define TSAGENT_WARNING_BIT_SIZE           256
#define TSAGENT_WARNING_BIT_UNIT           4
#define TSAGENT_MAX_DEV_ID                 1124 /* devid: 100 + 64*16 */
int tsagent_device_init(u32 devid, u32 tsid, struct trs_sqcq_agent_para *para);
int tsagent_device_uninit(u32 devid, u32 tsid);
int tsagent_sqe_update(u32 devid, u32 tsid, int pid, void *sqe_buf);
int tsagent_cqe_update(u32 devid, u32 tsid, int pid, void *cqe);
int tsagent_mailbox_update(u32 devid, u32 tsid, int pid, void *data, u32 size);

#endif // TS_AGENT_DVPP_H
